﻿#ifndef WIDGETPICTUREGALLERY_H
#define WIDGETPICTUREGALLERY_H

#include <QWidget>
#include <QStandardItemModel>
#include <QListView>

class QLabel;
class WidgetPictureGallery : public QWidget
{
    Q_OBJECT
public:
    explicit WidgetPictureGallery(QWidget *parent = nullptr);

private:
    void init();

public:
    void open(const QString &path);

    void sendPreviousOne();

private slots:
    void slot_add_new_graphics_item_status(int index, bool status);

    void slot_revert_graphics_item_to_list(const QString &path, int index);

private:
    QStandardItemModel mPictureModel;

    QListView mPictureView;

    // 正在添加标志
    bool mMatchingItemFlag = false;

    // 空图像提示
    QLabel *mLabelEmpty = nullptr;
};

#endif // WIDGETPICTUREGALLERY_H
